/**
 * Created by charlie on 18-1-11.
 */
import React from 'react'
import {StyleSheet,View,Text,Image,ScrollView} from 'react-native'

export default class index extends React.Component{
    render(){
        const {createDate,loginIp,loginName,mobile,photo,roleNames} = this.props.personalInfoes.data;
        return(
            <View style={styles.thisMianView}>
                <View style={{flexDirection:'row',justifyContent:'flex-start',}}>
                    <Text style={styles.thisTextName}>
                        登录名称:
                    </Text>
                    <Text style={styles.thisText}>
                        {loginName}
                    </Text>
                </View>
                <View style={{flexDirection:'row'}}>
                    <Text style={styles.thisTextName}>
                        登录日期:
                    </Text>
                    <Text style={styles.thisText}>
                        {createDate}
                    </Text>
                </View>

                <View style={{flexDirection:'row'}}>
                    <Text style={styles.thisTextName}>
                        登录头像:
                    </Text>
                    {
                        photo=='undefined'? <Image source={require('../../assets/imgs/avatar.png')}
                                                    style={styles.imageSize}/>
                            :<Image source={{uri:photo}} style={styles.imageSize}/>
                    }
                </View>
                <View style={{flexDirection:'row'}}>
                    <Text style={styles.thisTextName}>
                        IP地址号:
                    </Text>
                    <Text style={styles.thisText}>
                        {loginIp}
                    </Text>
                </View>
                <View style={{flexDirection:'row'}}>
                    <Text style={styles.thisTextName}>
                        当前角色:
                    </Text>
                    <Text style={styles.thisText}>
                        {roleNames}
                    </Text>
                </View>
                <View style={{flexDirection:'row'}}>
                    <Text style={styles.thisTextName}>
                        联系方式:
                    </Text>
                    <Text style={styles.thisText}>
                        {mobile==''?'暂无联系方式':mobile}
                    </Text>
                </View>

            </View>
        )
    }
}

const styles = StyleSheet.create({
    thisMianView:{
        flex:1,
        paddingRight:'20%',
        paddingLeft:'20%',
        justifyContent:'flex-start',
        flexDirection: 'column',
    },
    thisTextName:{
        color:'black',
        fontSize:15,
        paddingTop:10,
        paddingBottom:10
    },

    thisText:{
        paddingLeft:15,
        paddingTop:10,
        paddingBottom:10
    },

    imageSize:{
        width:200,
        height:200,
        marginLeft:15,
        marginTop:15,
        borderRadius:100
    }
})